package controllers

import play.api.mvc.{AbstractController, ControllerComponents}
import play.api.routing.JavaScriptReverseRouter

import javax.inject.Inject

/**
 * Created by yz on 6/5/2021
 */
class AppController  @Inject()(cc: ControllerComponents) extends AbstractController(cc){

  def javascriptRoutes = Action { implicit request =>
    Ok(
      JavaScriptReverseRouter("jsRoutes")(

        controllers.routes.javascript.BrowseController.getCircRnaSampleTypes,
        controllers.routes.javascript.BrowseController.getAllGeneSymbols,

        controllers.routes.javascript.PathwayController.getAllMsigdbSource,
        controllers.routes.javascript.PathwayController.searchAllByIdOrName,
        controllers.routes.javascript.PathwayController.getAllIdAndName,
        controllers.routes.javascript.PathwayController.getDetail,
        controllers.routes.javascript.PathwayController.getProfileImage,
        controllers.routes.javascript.PathwayController.getComparisonImage,
        controllers.routes.javascript.PathwayController.searchAllByServer,
        controllers.routes.javascript.PathwayController.downloadAll,
        controllers.routes.javascript.PathwayController.getAllDiffGroup,

        controllers.routes.javascript.CellController.getHead1000,
        controllers.routes.javascript.CellController.getAllCellTypes,
        controllers.routes.javascript.CellController.search,
        controllers.routes.javascript.CellController.selectAllByName,
        controllers.routes.javascript.CellController.getAllName,
        controllers.routes.javascript.CellController.getDetail,
        controllers.routes.javascript.CellController.getProfileImage,
        controllers.routes.javascript.CellController.getComparisonImage,
        controllers.routes.javascript.CellController.getPercentImage,
        controllers.routes.javascript.CellController.getCorHeatmapImage,
        controllers.routes.javascript.CellController.getAllDataset,
        controllers.routes.javascript.CellController.getSelectedDataset,
        controllers.routes.javascript.CellController.getImage,
        controllers.routes.javascript.CellController.getAllSample,
        controllers.routes.javascript.CellController.detailInfo,
        controllers.routes.javascript.CellController.downloadProportionPlotData,
        controllers.routes.javascript.CellController.downloadProportionBrowseData,
        controllers.routes.javascript.CellController.getAllDiffGroup,
        controllers.routes.javascript.CellController.getAllCellOrigins,

        controllers.routes.javascript.SearchController.getLinearImage,
        controllers.routes.javascript.SearchController.getHeatmapImage,

        controllers.routes.javascript.MrnaController.getAllByGeneNames,
        controllers.routes.javascript.MrnaController.getGeneNames,
        controllers.routes.javascript.MrnaController.getDetail,
        controllers.routes.javascript.MrnaController.getProfileImage,
        controllers.routes.javascript.MrnaController.getAllSampleType,
        controllers.routes.javascript.MrnaController.getComparisonImage,
        controllers.routes.javascript.MrnaController.searchAllByServer,
        controllers.routes.javascript.MrnaController.downloadAll,
        controllers.routes.javascript.MrnaController.getAllDiffGroup,
        controllers.routes.javascript.MrnaController.getAllTissue,

        controllers.routes.javascript.DetailController.detailInfo,
        controllers.routes.javascript.DetailController.getAllDataset,

        controllers.routes.javascript.CircRnaController.searchAllByGeneSymbolOrId,
        controllers.routes.javascript.CircRnaController.getAllCircIdAndGeneName,
        controllers.routes.javascript.CircRnaController.getDetail,
        controllers.routes.javascript.CircRnaController.getProfileImage,
        controllers.routes.javascript.CircRnaController.getComparisonImage,
        controllers.routes.javascript.CircRnaController.searchAllByServer,
        controllers.routes.javascript.CircRnaController.downloadAll,
        controllers.routes.javascript.CircRnaController.toResultBySymbolOrId,
        controllers.routes.javascript.CircRnaController.getAllDiffGroup,

        controllers.routes.javascript.ToolController.image2jpeg,
        controllers.routes.javascript.ToolController.png2pdf,
        controllers.routes.javascript.ToolController.image2svg,
        controllers.routes.javascript.ToolController.getFileData,
        controllers.routes.javascript.ToolController.getNoHeaderFileData,

        controllers.routes.javascript.DownloadController.download,

      )
    ).as("text/javascript")

  }



}
